package com.zqu.service.impl;

import com.zqu.mapper.ClientServeMappper;
import com.zqu.pojo.ClientServe;
import com.zqu.service.ClientServeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ClientServeServiceImpl implements ClientServeService {
    @Autowired(required = false)
    private ClientServeMappper clientServeMappper;


    @Override
    public ClientServe findServe(long id) {
        return clientServeMappper.selectTById(id);
    }

    @Override
    public List<ClientServe> selectList(ClientServe clientServe) {
        return clientServeMappper.selectList(clientServe);
    }

    @Override
    public boolean insertT(ClientServe clientServe) {
        int flag = clientServeMappper.insertT(clientServe);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateT(ClientServe clientServe) {
        int flag = clientServeMappper.updateT(clientServe);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteT(long id) {
        int flag = clientServeMappper.deleteT(id);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTByIds(String[] ids) {
        int flag = clientServeMappper.deleteTByIds(ids);
        if(flag>0){
            return true;
        }
        return false;
    }
}
